home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / dev / debug / FPSPSnoop.readme < prev    next >
Text File  |  2001-07-04  |  10KB  |  289 lines

  1. Short:    Trace unimplemented 68040 or 68060 instructions
  2. Author:   thor@math.tu-berlin.de (Thomas Richter)
  3. Uploader: thor@math.tu-berlin.de (Thomas Richter)
  4. Version:  40.2
  5. Type:     dev/debug
  6. Requires: mmu.library, disassembler.library, Sashimi or a serial terminal
  7.  
  8. This debugging tool intercepts the traps generated by a 68040 or 68060 
  9. processor as soon as it detects an instruction that is valid, but not
  10. implemented in hardware. It is the job of the 68040 or 68060.library to
  11. emulate these instructions in software. FPSPSnoop disassembles these
  12. instructions, and prints the user status of the CPU and FPU at the
  13. time the emulation is entered.
  14.  
  15. The disassembled instruction as well as as other status information is
  16. printed over the serial port, at 9600 baud, 8 bit, one stop bit, no parity.
  17.  
  18. A debugging or logging tool like Sushi or Sashimi can be used to display
  19. this output for a one-computer setup.
  20.  
  21. FPSPSnoop requires the installation of the disassembler.library (DisLib.lha
  22. on Aminet) and the mmu.library (MMULib.lha on Aminet). Both libraries
  23. are not included in this archive.
  24.  
  25. ____________________________________________________________________________
  26.  
  27.                         The THOR-Software Licence
  28.  
  29.  
  30. This License applies to the computer programs known as "FPSPSnoop".
  31. The "Program", below, refers to such program.
  32.  
  33.  
  34. The programs and files in this distribution are freely distributable
  35. under the restrictions stated below, but are also Copyright (c)
  36. Thomas Richter.
  37.  
  38.  
  39. Distribution of the Program by a commercial organization without written
  40. permission from the author to any third party is prohibited if any payment
  41. is made in connection with such distribution, whether directly
  42. (as in payment for a copy of the Program) or indirectly (as in payment
  43. for some service related to the Program, or payment for some product
  44. or service that includes a copy of the Program "without charge";
  45. these are only examples, and not an exhaustive enumeration of prohibited
  46. activities). However, the following methods of distribution involving
  47. payment shall not in and of themselves be a violation of this restriction:
  48.  
  49.  
  50. (i) Posting the Program on a public access information storage and
  51. retrieval service for which a fee is received for retrieving information
  52. (such as an on-line service), provided that the fee is not
  53. content-dependent (i.e., the fee would be the same for retrieving the same
  54. volume of information consisting of random data).
  55.  
  56.  
  57.  
  58. (ii) Distributing the Program on a CD-ROM, provided that the files
  59. containing the Program are reproduced entirely and verbatim on such
  60. CD-ROM, and provided further that all information on such CD-ROM be
  61. redistributable for non-commercial purposes without charge.
  62.  
  63.  
  64.  
  65. Everything in this distribution must be kept together, in original
  66. and unmodified form.
  67.  
  68.  
  69.  
  70.  
  71. Limitations.
  72.  
  73. THE PROGRAM IS PROVIDED TO YOU "AS IS," WITHOUT WARRANTY. THERE IS NO
  74. WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
  75. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
  76. PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE
  77. RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD
  78. THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  79. SERVICING, REPAIR OR CORRECTION.
  80.  
  81.  
  82.  
  83. IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE ALL FILES CONTAINED IN
  84. THIS ARCHIVE.
  85.  
  86. _____________________________________________________________________________
  87.  
  88.  
  89. Installation:
  90.  
  91. Download the DisLib.lha and MMULib.lha archives from Aminet and install
  92. them if you haven't done so already. Especially, the disassembler.library
  93. and the mmu.library must be placed into LIBS: or any other directory where
  94. an OpenLibray() will find them. 
  95.  
  96. Copy FPSPSnoop to whereever you want.
  97. _____________________________________________________________________________
  98.  
  99. Starting FPSPSnoop:
  100.  
  101. If you do not own two computers and a null-modem cable, you need to run
  102. Sashimi first. Now start FPSPSnoop. The program won't return to the shell
  103. until you abort it with ^C (Control-C) which will de-install it.
  104.  
  105. To test FPSPSnop, open a new shell and run the TestFPU command. Sashimi
  106. or an external terminal should now show the disassembly of some implemented
  107. instructions.
  108. _____________________________________________________________________________
  109.  
  110. Synopsis:
  111.  
  112. FPSPSnoop NOFPSP/S,NOISP/S,NOOVL/S,NOUVL/S,NOSNAN/S,NOOPERR/S,NOBUN/S,
  113.       NOINEX/S,NODIVZ/S,NOUNEA/S,NOUNDT/S
  114.  
  115. NOFPSP/S        If present, do not snoop unimplemented FPU 
  116.             instructions.
  117.  
  118. NOISP/S            If present, FPSPSnoop does not snoop the 
  119.             unimplemented integer instruction exception of the
  120.             68060. This switch has no effect for the 68040.
  121.  
  122. NOOVL/S            Do not snoop overflow exceptions which are generated
  123.             for unnormalized or denormalized results the 040 or
  124.             060 cannot handle in hardware.
  125.  
  126. NOUVL/S            Do not snoop underflow exceptions the 040 or 060
  127.             cannot handle in hardware.
  128.  
  129. NOSNAN/S        Do not snoop signalling NAN exceptions.
  130.  
  131. NOOPERR/S        Do not snoop operand error exceptions which occur
  132.             on invalid arguments to certain FPU instructions.
  133.  
  134. NOBUN/S            Do not snoop "branch on unordered" exceptions that
  135.             occur if a branch decision has to be made on an
  136.             "unordered" (NAN) result.
  137.  
  138. NOINEX/S        Do not snoop "inexact result" exceptions.
  139.  
  140. NODIVZ/S        Do not snoop "FPU divide by zero" exceptions.
  141.  
  142. NOUNEA/S        Do not snoop "unsupported effective address" 
  143.             exceptions that are generated by the 060 or 040 if
  144.             an addressing mode is used that is not directly
  145.             supported by the FPU in hardware.
  146.  
  147. NOUNDT/S        Do not snoop "unsupported data type" exceptions of
  148.             the 040 and 060 that happen if you try to read or
  149.             write data in "packed decimal" format that is not
  150.             supported in firmware.
  151.  
  152. _____________________________________________________________________________
  153.  
  154. Meaning of the snooped output:
  155.  
  156. Caught 68040/68060 trap conditition: Unimplemented FPU data type 
  157.                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  158.             Cause for the exception. Here an unimplemented FPU
  159.             data type, i.e. "packed decimal".
  160.  
  161. PC   : 085a731e SR: ____0_____ USP: 08601198 SSP: 08002548 EA: 085a7334 ( )( )
  162.  
  163. CPU status at the time of the exception:
  164.  
  165. PC    :    program counter, here always set to the problematic instruction
  166. SR    :    Status register, bits from left to right:
  167.         T    trace enabled
  168.         t    trace on instruction flow change enabled (040 only)
  169.         S    supervisor state enabled
  170.         M    master state enabled (040 only)
  171.         0..7    current interrupt level
  172.         X    extension bit
  173.         N    negative bit
  174.         Z    zero bit
  175.         V    overflow bit
  176.         C    carry bit
  177.  
  178. USP    :    user stack pointer
  179. SSP    :    interrupt stack pointer
  180. EA    :    calculated effective address of the offending instruction,
  181.         not necessarily meaningful.
  182.  
  183. ( )    :    If an 'I' is present here, interrupts are disabled
  184. ( )    :    If a 'T' is shown here, task switching is forbidden.
  185.  
  186. Name : FPUTest
  187.        ^^^^^^^
  188. Task or command name of the program that contains the offending instruction.
  189.  
  190. Data : 00000002 00000000 00000008 085fec84 00000001 0217e275 0216ca45 085a7304
  191. ^^^^
  192. Dump of the data registers of the CPU at the time of the fault.
  193.  
  194. Addr : 085a7334 085ff1b0 08015064 085a7304 0860119c 00f9feaa 00f9fe9e 08601198
  195. ^^^^
  196. Dump of the address registers of the CPU at the time of the fault. A7 is
  197. either the USP or the SSP, depending on the "S" bit in the SR. MSP usage is
  198. not supported.
  199.  
  200. EA   : 00000000 00000000 00000000 00000140 085a7ad4 085a6e34 0000085a 74d0085a
  201. ^^^^^
  202. Dump at the effective address <EA> field whenever available and pointing to
  203. readable memory.
  204.  
  205. FP0  : 400000008000000000000000 = +2
  206. FP1  : 3ffe0000e8c7b7568da22efe = +0.9092974268256817
  207. FP2  : 7fff0000ffffffffffffffff = +NAN
  208. FP3  : 7fff0000ffffffffffffffff = +NAN
  209. FP4  : 7fff0000ffffffffffffffff = +NAN
  210. FP5  : 7fff0000ffffffffffffffff = +NAN
  211. FP6  : 7fff0000ffffffffffffffff = +NAN
  212. FP7  : 7fff0000ffffffffffffffff = +NAN
  213. ^^^^^
  214. Contents of the FPU registers, only for FPU exceptions. The left hand side
  215. presents the FPU registers in extended precision as hex dump, the right hand
  216. side in human readable form.
  217.  
  218. FPCR : ________.nx FPSR : ____.+00000000 ______2_.____i FPIAR : 085a731e
  219.  
  220. Various FPU status flags:
  221.  
  222. FPCR    :    FPU control register contents, from left to right:
  223.         B    :    branch on unordered exception enabled
  224.         S    :    signalling NAN exception enabled
  225.         P    :    operand error exception enabled
  226.         O    :    overflow exception enabled
  227.         U    :    underflow exception enabled
  228.         D    :    divide by zero exception enabled
  229.         2    :    inexact operation exception enabled
  230.         1    :    inexact decimal input exception enabled
  231.  
  232.         Rounding mode:    n    round to nearest
  233.                 0    round to zero
  234.                 +    round to plus infinity
  235.                 -    round to minus infinity
  236.         Precision:    x    extended precision
  237.                 d    double precision
  238.                 s    single precision
  239.                 ?    precision setup invalid
  240.  
  241. FPSR    :    FPU status register contents, from left to right
  242.         N    :    last result was negative
  243.         Z    :    last result was zero
  244.         I    :    last result was infinity
  245.         U    :    last result was unordered
  246.  
  247.         +/-    :    Sign of the quotient
  248.         ...    :    seven last significant bits of quotient
  249.  
  250.         B    :    branch on unordered exception pending
  251.         S    :    sigalling NAN exception pending
  252.         P    :    operand error exception pending
  253.         O    :    overflow exception pending
  254.         U    :    underflow exception pending
  255.         D    :    divide by zero exception pending
  256.         2    :    inexact operation exception pending
  257.         1    :    inexact decimal input exception pending
  258.  
  259.         v    :    invalid operation accrued
  260.         o    :    overflow exception accrued
  261.         u    :    underflow exception accrued
  262.         d    :    divide by zero exception accrued
  263.         i    :    inexact exception accrued
  264.  
  265. FPIAR    :    address of the offending FPU instruction. Here always
  266.         identical to the PC
  267.  
  268. 085a731e : *f210 6c08                  fmove.p fp0,(a0){#$8} ;extended opcode
  269. ^^^^^^^^
  270. Disassembly of the offending instruction. Here, the problem is the requested
  271. "packed decimal" output format that requires interaction of the 68040 or
  272. 68060.library.
  273. _____________________________________________________________________________
  274.  
  275.  
  276. May 2001,
  277.     Thomas
  278.  
  279.  
  280. ============================= Archive contents =============================
  281.  
  282. Original  Packed Ratio    Date     Time    Name
  283. -------- ------- ----- --------- --------  -------------
  284.     5976    3267 45.3% 07-May-01 22:21:54  FPSPSnoop
  285.     9864    3923 60.2% 10-May-01 22:13:16  FPSPSnoop.readme
  286.       92      70 23.9% 05-May-01 14:18:54  TestFPU
  287. -------- ------- ----- --------- --------
  288.    15932    7260 54.4% 15-May-101 05:48:02   3 files
  289.